//---------------------------------------------------------------------
// File: ServiceFault.cs
// 
// Summary: Provides Exception Shielding Fault Contract
//          Called from ExceptionShielding.CreateFaultException().  Used
//          to provide sanitized fault info for custom Fault Contracts. 
//          Custom Fault Contracts derive from this.
//
//
//---------------------------------------------------------------------
// This file is part of the Microsoft ESB Guidance for BizTalk
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is intended only as a supplement to Microsoft BizTalk
// Server 2006 R2 release and/or on-line documentation. See these other
// materials for detailed information regarding Microsoft code samples.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace Microsoft.Practices.ESB.Exception.Management.FaultContracts
{
    [DataContract(Name = "ServiceFault", Namespace = "http://Microsoft.Practices.ESB.Exception.Management.FaultContracts/")]
    public class ServiceFault
    {

        public ServiceFault() { }

        private Guid id;
        private string message;

        [DataMember]
        public string Message
        {
            get { return message; }
            set { message = value; }
        }

        [DataMember]
        public Guid Id
        {
            get { return id; }
            set { id = value; }
        }

        public virtual void SetFault(Guid guid,string message)
        {
            //default type
            this.id = guid;
            this.message = message;
        }

    }
}
